package cn.ssms.util;

import cn.ssms.model.Log;

/**
 * 生成日志的辅助类
 * 
 * @author lz
 *
 */
public class LogUtil {

	public static Log createLog(String userName,String clientIP,
			String module,String action,String data,String state,String describe) {
		Log log = new Log();
		log.setLogid(PrimaryKeyGenerate.getInstance("LOG"));
		log.setTime(new java.util.Date());
		log.setUsername(userName);
		log.setIp(clientIP);
		log.setModule(module);
		log.setAction(action);
		log.setData(data);
		log.setState(state);
		log.setDescribe(describe);
		return log;
	}
}
